package com.ruoyi.truth.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.truth.mapper.QualScoringMapper;
import com.ruoyi.truth.domain.QualScoring;
import com.ruoyi.truth.service.IQualScoringService;

/**
 * 定性信息评分Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-05
 */
@Service
public class QualScoringServiceImpl implements IQualScoringService 
{
    @Autowired
    private QualScoringMapper qualScoringMapper;

    /**
     * 查询定性信息评分
     * 
     * @param scoreId 定性信息评分主键
     * @return 定性信息评分
     */
    @Override
    public QualScoring selectQualScoringByScoreId(Long scoreId)
    {
        return qualScoringMapper.selectQualScoringByScoreId(scoreId);
    }

    /**
     * 查询定性信息评分列表
     * 
     * @param qualScoring 定性信息评分
     * @return 定性信息评分
     */
    @Override
    public List<QualScoring> selectQualScoringList(QualScoring qualScoring)
    {
        return qualScoringMapper.selectQualScoringList(qualScoring);
    }

    /**
     * 新增定性信息评分
     * 
     * @param qualScoring 定性信息评分
     * @return 结果
     */
    @Override
    public int insertQualScoring(QualScoring qualScoring)
    {
        qualScoring.setCreateTime(DateUtils.getNowDate());
        return qualScoringMapper.insertQualScoring(qualScoring);
    }

    /**
     * 修改定性信息评分
     * 
     * @param qualScoring 定性信息评分
     * @return 结果
     */
    @Override
    public int updateQualScoring(QualScoring qualScoring)
    {
        qualScoring.setUpdateTime(DateUtils.getNowDate());
        return qualScoringMapper.updateQualScoring(qualScoring);
    }

    /**
     * 批量删除定性信息评分
     * 
     * @param scoreIds 需要删除的定性信息评分主键
     * @return 结果
     */
    @Override
    public int deleteQualScoringByScoreIds(Long[] scoreIds)
    {
        return qualScoringMapper.deleteQualScoringByScoreIds(scoreIds);
    }

    /**
     * 删除定性信息评分信息
     * 
     * @param scoreId 定性信息评分主键
     * @return 结果
     */
    @Override
    public int deleteQualScoringByScoreId(Long scoreId)
    {
        return qualScoringMapper.deleteQualScoringByScoreId(scoreId);
    }
}
